Class: Spatio::NotesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/spatio-sdk/api/notes_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ NotesApi

Returns a new instance of NotesApi.



19
20
21
# File 'lib/spatio-sdk/api/notes_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/spatio-sdk/api/notes_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_block(id, create_block_request, opts = {}) ⇒ Block

Insert a block in a note.

Parameters:

  • id (String)

    Note id.

  • create_block_request (CreateBlockRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with `provider`. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



29
30
31
32
# File 'lib/spatio-sdk/api/notes_api.rb', line 29

def create_block(id, create_block_request, opts = {})
  data, _status_code, _headers = create_block_with_http_info(id, create_block_request, opts)
  data
end

#create_block_with_http_info(id, create_block_request, opts = {}) ⇒ Array<(Block, Integer, Hash)>

Insert a block in a note.

Parameters:

  • id (String)

    Note id.

  • create_block_request (CreateBlockRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(Block, Integer, Hash)>)

    Block data, response status code and response headers



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/spatio-sdk/api/notes_api.rb', line 41

def create_block_with_http_info(id, create_block_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.create_block ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.create_block"
  end
  # verify the required parameter 'create_block_request' is set
  if @api_client.config.client_side_validation && create_block_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_block_request' when calling NotesApi.create_block"
  end
  # resource path
  local_var_path = '/v1/notes/{id}/blocks'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_block_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Block'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.create_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#create_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_note(create_note_request, opts = {}) ⇒ Note

Create a note. Creates a new note under the target account. The target is resolved in this order: ‘accountId` field on the body → `?accountId=` query → `provider` field on the body → `?provider=` query → the caller’s single connected account (errors with ‘ambiguous_account` if more than one is connected and no selector is supplied).

Parameters:

  • create_note_request (CreateNoteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :provider (String)

    Provider id (e.g. &#x60;native-notes&#x60;, &#x60;notion&#x60;). Selects every connected account for the provider. Mutually exclusive with &#x60;accountId&#x60;.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



108
109
110
111
# File 'lib/spatio-sdk/api/notes_api.rb', line 108

def create_note(create_note_request, opts = {})
  data, _status_code, _headers = create_note_with_http_info(create_note_request, opts)
  data
end

#create_note_comment(id, create_comment_request, opts = {}) ⇒ CommentMutationResponse

Create a comment or reply.

Parameters:

  • id (String)

    Note id.

  • create_comment_request (CreateCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



184
185
186
187
# File 'lib/spatio-sdk/api/notes_api.rb', line 184

def create_note_comment(id, create_comment_request, opts = {})
  data, _status_code, _headers = create_note_comment_with_http_info(id, create_comment_request, opts)
  data
end

#create_note_comment_with_http_info(id, create_comment_request, opts = {}) ⇒ Array<(CommentMutationResponse, Integer, Hash)>

Create a comment or reply.

Parameters:

  • id (String)

    Note id.

  • create_comment_request (CreateCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(CommentMutationResponse, Integer, Hash)>)

    CommentMutationResponse data, response status code and response headers



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/spatio-sdk/api/notes_api.rb', line 196

def create_note_comment_with_http_info(id, create_comment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.create_note_comment ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.create_note_comment"
  end
  # verify the required parameter 'create_comment_request' is set
  if @api_client.config.client_side_validation && create_comment_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_comment_request' when calling NotesApi.create_note_comment"
  end
  # resource path
  local_var_path = '/v1/notes/{id}/comments'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_comment_request)

  # return_type
  return_type = opts[:debug_return_type] || 'CommentMutationResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.create_note_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#create_note_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_note_with_http_info(create_note_request, opts = {}) ⇒ Array<(Note, Integer, Hash)>

Create a note. Creates a new note under the target account. The target is resolved in this order: &#x60;accountId&#x60; field on the body → &#x60;?accountId&#x3D;&#x60; query → &#x60;provider&#x60; field on the body → &#x60;?provider&#x3D;&#x60; query → the caller&#39;s single connected account (errors with &#x60;ambiguous_account&#x60; if more than one is connected and no selector is supplied).

Parameters:

  • create_note_request (CreateNoteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :provider (String)

    Provider id (e.g. &#x60;native-notes&#x60;, &#x60;notion&#x60;). Selects every connected account for the provider. Mutually exclusive with &#x60;accountId&#x60;.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(Note, Integer, Hash)>)

    Note data, response status code and response headers



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/spatio-sdk/api/notes_api.rb', line 121

def create_note_with_http_info(create_note_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.create_note ...'
  end
  # verify the required parameter 'create_note_request' is set
  if @api_client.config.client_side_validation && create_note_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_note_request' when calling NotesApi.create_note"
  end
  # resource path
  local_var_path = '/v1/notes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_note_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Note'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.create_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#create_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_block(id, opts = {}) ⇒ SuccessFlag

Delete a block.

Parameters:

  • id (String)

    Block id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



261
262
263
264
# File 'lib/spatio-sdk/api/notes_api.rb', line 261

def delete_block(id, opts = {})
  data, _status_code, _headers = delete_block_with_http_info(id, opts)
  data
end

#delete_block_with_http_info(id, opts = {}) ⇒ Array<(SuccessFlag, Integer, Hash)>

Delete a block.

Parameters:

  • id (String)

    Block id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(SuccessFlag, Integer, Hash)>)

    SuccessFlag data, response status code and response headers



272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/spatio-sdk/api/notes_api.rb', line 272

def delete_block_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.delete_block ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.delete_block"
  end
  # resource path
  local_var_path = '/v1/notes/blocks/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SuccessFlag'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.delete_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#delete_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_note(id, opts = {}) ⇒ SuccessFlag

Delete a note.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



328
329
330
331
# File 'lib/spatio-sdk/api/notes_api.rb', line 328

def delete_note(id, opts = {})
  data, _status_code, _headers = delete_note_with_http_info(id, opts)
  data
end

#delete_note_comment(id, comment_id, opts = {}) ⇒ SuccessFlag

Soft-delete (native) or hard-delete (provider) a comment. Allowed for the comment author and for the note owner.

Parameters:

  • id (String)

    Note id.

  • comment_id (String)

    Comment id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



397
398
399
400
# File 'lib/spatio-sdk/api/notes_api.rb', line 397

def delete_note_comment(id, comment_id, opts = {})
  data, _status_code, _headers = delete_note_comment_with_http_info(id, comment_id, opts)
  data
end

#delete_note_comment_with_http_info(id, comment_id, opts = {}) ⇒ Array<(SuccessFlag, Integer, Hash)>

Soft-delete (native) or hard-delete (provider) a comment. Allowed for the comment author and for the note owner.

Parameters:

  • id (String)

    Note id.

  • comment_id (String)

    Comment id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(SuccessFlag, Integer, Hash)>)

    SuccessFlag data, response status code and response headers



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
# File 'lib/spatio-sdk/api/notes_api.rb', line 410

def delete_note_comment_with_http_info(id, comment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.delete_note_comment ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.delete_note_comment"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling NotesApi.delete_note_comment"
  end
  # resource path
  local_var_path = '/v1/notes/{id}/comments/{commentId}'.sub('{id}', CGI.escape(id.to_s)).sub('{commentId}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SuccessFlag'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.delete_note_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#delete_note_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_note_with_http_info(id, opts = {}) ⇒ Array<(SuccessFlag, Integer, Hash)>

Delete a note.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(SuccessFlag, Integer, Hash)>)

    SuccessFlag data, response status code and response headers



339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'lib/spatio-sdk/api/notes_api.rb', line 339

def delete_note_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.delete_note ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.delete_note"
  end
  # resource path
  local_var_path = '/v1/notes/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SuccessFlag'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.delete_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#delete_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#disable_note_share(id, opts = {}) ⇒ nil

Disable public sharing. Owner-only. Subsequent public viewer requests 404.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (nil)


471
472
473
474
# File 'lib/spatio-sdk/api/notes_api.rb', line 471

def disable_note_share(id, opts = {})
  disable_note_share_with_http_info(id, opts)
  nil
end

#disable_note_share_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Disable public sharing. Owner-only. Subsequent public viewer requests 404.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/spatio-sdk/api/notes_api.rb', line 483

def disable_note_share_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.disable_note_share ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.disable_note_share"
  end
  # resource path
  local_var_path = '/v1/notes/{id}/share'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.disable_note_share",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#disable_note_share\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#enable_note_share(id, opts = {}) ⇒ ShareSettings

Enable (or update password on) public sharing. Owner-only. Calling with an empty body or ‘setPassword: false` flips the note public without changing the password. With `setPassword: true`, applies `password` (empty string clears).

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

  • :enable_share_request (EnableShareRequest)

Returns:



541
542
543
544
# File 'lib/spatio-sdk/api/notes_api.rb', line 541

def enable_note_share(id, opts = {})
  data, _status_code, _headers = enable_note_share_with_http_info(id, opts)
  data
end

#enable_note_share_with_http_info(id, opts = {}) ⇒ Array<(ShareSettings, Integer, Hash)>

Enable (or update password on) public sharing. Owner-only. Calling with an empty body or &#x60;setPassword: false&#x60; flips the note public without changing the password. With &#x60;setPassword: true&#x60;, applies &#x60;password&#x60; (empty string clears).

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

  • :enable_share_request (EnableShareRequest)

Returns:

  • (Array<(ShareSettings, Integer, Hash)>)

    ShareSettings data, response status code and response headers



554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
# File 'lib/spatio-sdk/api/notes_api.rb', line 554

def enable_note_share_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.enable_note_share ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.enable_note_share"
  end
  # resource path
  local_var_path = '/v1/notes/{id}/share'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'enable_share_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'ShareSettings'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.enable_note_share",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#enable_note_share\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_block(id, opts = {}) ⇒ Block

Fetch one block.

Parameters:

  • id (String)

    Block id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



615
616
617
618
# File 'lib/spatio-sdk/api/notes_api.rb', line 615

def get_block(id, opts = {})
  data, _status_code, _headers = get_block_with_http_info(id, opts)
  data
end

#get_block_with_http_info(id, opts = {}) ⇒ Array<(Block, Integer, Hash)>

Fetch one block.

Parameters:

  • id (String)

    Block id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(Block, Integer, Hash)>)

    Block data, response status code and response headers



626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
# File 'lib/spatio-sdk/api/notes_api.rb', line 626

def get_block_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.get_block ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.get_block"
  end
  # resource path
  local_var_path = '/v1/notes/blocks/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Block'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.get_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#get_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_note(id, opts = {}) ⇒ Note

Fetch one note.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



682
683
684
685
# File 'lib/spatio-sdk/api/notes_api.rb', line 682

def get_note(id, opts = {})
  data, _status_code, _headers = get_note_with_http_info(id, opts)
  data
end

#get_note_comment(id, comment_id, opts = {}) ⇒ CommentResponse

Fetch one comment. Useful for permalink hydration when the renderer deep-links into a reply thread.

Parameters:

  • id (String)

    Note id.

  • comment_id (String)

    Comment id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



751
752
753
754
# File 'lib/spatio-sdk/api/notes_api.rb', line 751

def get_note_comment(id, comment_id, opts = {})
  data, _status_code, _headers = get_note_comment_with_http_info(id, comment_id, opts)
  data
end

#get_note_comment_with_http_info(id, comment_id, opts = {}) ⇒ Array<(CommentResponse, Integer, Hash)>

Fetch one comment. Useful for permalink hydration when the renderer deep-links into a reply thread.

Parameters:

  • id (String)

    Note id.

  • comment_id (String)

    Comment id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(CommentResponse, Integer, Hash)>)

    CommentResponse data, response status code and response headers



764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
# File 'lib/spatio-sdk/api/notes_api.rb', line 764

def get_note_comment_with_http_info(id, comment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.get_note_comment ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.get_note_comment"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling NotesApi.get_note_comment"
  end
  # resource path
  local_var_path = '/v1/notes/{id}/comments/{commentId}'.sub('{id}', CGI.escape(id.to_s)).sub('{commentId}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CommentResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.get_note_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#get_note_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_note_share_settings(id, opts = {}) ⇒ ShareSettings

Fetch share settings for a note. Owner-only. Returns the current public-share configuration, including the share token and computed public viewer URL when the note is currently public.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



825
826
827
828
# File 'lib/spatio-sdk/api/notes_api.rb', line 825

def get_note_share_settings(id, opts = {})
  data, _status_code, _headers = get_note_share_settings_with_http_info(id, opts)
  data
end

#get_note_share_settings_with_http_info(id, opts = {}) ⇒ Array<(ShareSettings, Integer, Hash)>

Fetch share settings for a note. Owner-only. Returns the current public-share configuration, including the share token and computed public viewer URL when the note is currently public.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(ShareSettings, Integer, Hash)>)

    ShareSettings data, response status code and response headers



837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
# File 'lib/spatio-sdk/api/notes_api.rb', line 837

def get_note_share_settings_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.get_note_share_settings ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.get_note_share_settings"
  end
  # resource path
  local_var_path = '/v1/notes/{id}/share'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ShareSettings'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.get_note_share_settings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#get_note_share_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_note_with_http_info(id, opts = {}) ⇒ Array<(Note, Integer, Hash)>

Fetch one note.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(Note, Integer, Hash)>)

    Note data, response status code and response headers



693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
# File 'lib/spatio-sdk/api/notes_api.rb', line 693

def get_note_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.get_note ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.get_note"
  end
  # resource path
  local_var_path = '/v1/notes/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Note'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.get_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#get_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_public_note(token, opts = {}) ⇒ Hash<String, Object>

Fetch a publicly shared note. Unauthenticated. The share token is the credential. For password-protected notes the password is supplied via the ‘?password=` query param; the response distinguishes "no password supplied" from "wrong password" so the viewer can render the right prompt. Unknown tokens and disabled-share notes both return `404` to prevent token enumeration.

Parameters:

  • token (String)

    Opaque public-share token.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :password (String)

    Optional viewer password.

Returns:

  • (Hash<String, Object>)


893
894
895
896
# File 'lib/spatio-sdk/api/notes_api.rb', line 893

def get_public_note(token, opts = {})
  data, _status_code, _headers = get_public_note_with_http_info(token, opts)
  data
end

#get_public_note_with_http_info(token, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Fetch a publicly shared note. Unauthenticated. The share token is the credential. For password-protected notes the password is supplied via the &#x60;?password&#x3D;&#x60; query param; the response distinguishes &quot;no password supplied&quot; from &quot;wrong password&quot; so the viewer can render the right prompt. Unknown tokens and disabled-share notes both return &#x60;404&#x60; to prevent token enumeration.

Parameters:

  • token (String)

    Opaque public-share token.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :password (String)

    Optional viewer password.

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
# File 'lib/spatio-sdk/api/notes_api.rb', line 904

def get_public_note_with_http_info(token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.get_public_note ...'
  end
  # verify the required parameter 'token' is set
  if @api_client.config.client_side_validation && token.nil?
    fail ArgumentError, "Missing the required parameter 'token' when calling NotesApi.get_public_note"
  end
  # resource path
  local_var_path = '/public/notes/{token}'.sub('{token}', CGI.escape(token.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"NotesApi.get_public_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#get_public_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_blocks(id, opts = {}) ⇒ BlockListResponse

List blocks under a note. Returns the block tree for a note, paginated. Block listing always targets a single account (the one that owns the note) so it does not fan out — the response is a plain ‘{ blocks, total }`.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

  • :parent_id (String)

    Filter to children of this block id. Omit to list root-level blocks.

  • :limit (Integer) — default: default to 100
  • :offset (Integer) — default: default to 0

Returns:



963
964
965
966
# File 'lib/spatio-sdk/api/notes_api.rb', line 963

def list_blocks(id, opts = {})
  data, _status_code, _headers = list_blocks_with_http_info(id, opts)
  data
end

#list_blocks_with_http_info(id, opts = {}) ⇒ Array<(BlockListResponse, Integer, Hash)>

List blocks under a note. Returns the block tree for a note, paginated. Block listing always targets a single account (the one that owns the note) so it does not fan out — the response is a plain &#x60;{ blocks, total }&#x60;.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

  • :parent_id (String)

    Filter to children of this block id. Omit to list root-level blocks.

  • :limit (Integer) — default: default to 100
  • :offset (Integer) — default: default to 0

Returns:

  • (Array<(BlockListResponse, Integer, Hash)>)

    BlockListResponse data, response status code and response headers



978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
# File 'lib/spatio-sdk/api/notes_api.rb', line 978

def list_blocks_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.list_blocks ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.list_blocks"
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NotesApi.list_blocks, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling NotesApi.list_blocks, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/v1/notes/{id}/blocks'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
  query_params[:'parent_id'] = opts[:'parent_id'] if !opts[:'parent_id'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BlockListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.list_blocks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#list_blocks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_note_comments(id, opts = {}) ⇒ CommentListResponse

List comments on a note. Returns active (non-deleted) comments. When ‘?accountId=` targets an external provider that supports comments (e.g. Notion), the provider is queried directly; otherwise the native store is used.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



1046
1047
1048
1049
# File 'lib/spatio-sdk/api/notes_api.rb', line 1046

def list_note_comments(id, opts = {})
  data, _status_code, _headers = list_note_comments_with_http_info(id, opts)
  data
end

#list_note_comments_with_http_info(id, opts = {}) ⇒ Array<(CommentListResponse, Integer, Hash)>

List comments on a note. Returns active (non-deleted) comments. When &#x60;?accountId&#x3D;&#x60; targets an external provider that supports comments (e.g. Notion), the provider is queried directly; otherwise the native store is used.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(CommentListResponse, Integer, Hash)>)

    CommentListResponse data, response status code and response headers



1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
# File 'lib/spatio-sdk/api/notes_api.rb', line 1058

def list_note_comments_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.list_note_comments ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.list_note_comments"
  end
  # resource path
  local_var_path = '/v1/notes/{id}/comments'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CommentListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.list_note_comments",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#list_note_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_notes(opts = {}) ⇒ NoteListEnvelope

List notes across connected accounts. Fan-out list. Returns every note visible to the caller across every connected notes provider, paginated by ‘limit` / `offset`. Pass `?accountId=` or `?provider=` to scope to a single source.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :provider (String)

    Provider id (e.g. &#x60;native-notes&#x60;, &#x60;notion&#x60;). Selects every connected account for the provider. Mutually exclusive with &#x60;accountId&#x60;.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

  • :archived (Boolean)

    When &#x60;true&#x60;, return archived notes instead of active ones. (default to false)

  • :parent_id (String)

    Filter to notes nested under this parent note id.

  • :tags (Array<String>)

    Repeatable. Filter to notes carrying every tag listed.

  • :limit (Integer)

    Max items to return. Defaults to 50. (default to 50)

  • :offset (Integer)

    Number of items to skip. (default to 0)

  • :sort_by (String)

    Sort field. Provider-dependent; the native provider supports &#x60;updated_at&#x60;, &#x60;created_at&#x60;, &#x60;title&#x60;. (default to ‘updated_at’)

  • :sort_order (String) — default: default to 'desc'

Returns:



1122
1123
1124
1125
# File 'lib/spatio-sdk/api/notes_api.rb', line 1122

def list_notes(opts = {})
  data, _status_code, _headers = list_notes_with_http_info(opts)
  data
end

#list_notes_with_http_info(opts = {}) ⇒ Array<(NoteListEnvelope, Integer, Hash)>

List notes across connected accounts. Fan-out list. Returns every note visible to the caller across every connected notes provider, paginated by &#x60;limit&#x60; / &#x60;offset&#x60;. Pass &#x60;?accountId&#x3D;&#x60; or &#x60;?provider&#x3D;&#x60; to scope to a single source.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :provider (String)

    Provider id (e.g. &#x60;native-notes&#x60;, &#x60;notion&#x60;). Selects every connected account for the provider. Mutually exclusive with &#x60;accountId&#x60;.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

  • :archived (Boolean)

    When &#x60;true&#x60;, return archived notes instead of active ones. (default to false)

  • :parent_id (String)

    Filter to notes nested under this parent note id.

  • :tags (Array<String>)

    Repeatable. Filter to notes carrying every tag listed.

  • :limit (Integer)

    Max items to return. Defaults to 50. (default to 50)

  • :offset (Integer)

    Number of items to skip. (default to 0)

  • :sort_by (String)

    Sort field. Provider-dependent; the native provider supports &#x60;updated_at&#x60;, &#x60;created_at&#x60;, &#x60;title&#x60;. (default to ‘updated_at’)

  • :sort_order (String) — default: default to 'desc'

Returns:

  • (Array<(NoteListEnvelope, Integer, Hash)>)

    NoteListEnvelope data, response status code and response headers



1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
# File 'lib/spatio-sdk/api/notes_api.rb', line 1141

def list_notes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.list_notes ...'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NotesApi.list_notes, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling NotesApi.list_notes, must be greater than or equal to 0.'
  end

  allowable_values = ["asc", "desc"]
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
    fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/notes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?
  query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
  query_params[:'parent_id'] = opts[:'parent_id'] if !opts[:'parent_id'].nil?
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'NoteListEnvelope'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.list_notes",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#list_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#move_block(id, move_block_request, opts = {}) ⇒ SuccessFlag

Reparent or reorder a block.

Parameters:

  • id (String)

    Block id.

  • move_block_request (MoveBlockRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



1214
1215
1216
1217
# File 'lib/spatio-sdk/api/notes_api.rb', line 1214

def move_block(id, move_block_request, opts = {})
  data, _status_code, _headers = move_block_with_http_info(id, move_block_request, opts)
  data
end

#move_block_with_http_info(id, move_block_request, opts = {}) ⇒ Array<(SuccessFlag, Integer, Hash)>

Reparent or reorder a block.

Parameters:

  • id (String)

    Block id.

  • move_block_request (MoveBlockRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(SuccessFlag, Integer, Hash)>)

    SuccessFlag data, response status code and response headers



1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
# File 'lib/spatio-sdk/api/notes_api.rb', line 1226

def move_block_with_http_info(id, move_block_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.move_block ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.move_block"
  end
  # verify the required parameter 'move_block_request' is set
  if @api_client.config.client_side_validation && move_block_request.nil?
    fail ArgumentError, "Missing the required parameter 'move_block_request' when calling NotesApi.move_block"
  end
  # resource path
  local_var_path = '/v1/notes/blocks/{id}/move'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(move_block_request)

  # return_type
  return_type = opts[:debug_return_type] || 'SuccessFlag'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.move_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#move_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#rotate_note_share_token(id, opts = {}) ⇒ ShareSettings

Rotate the share token, invalidating any outstanding URLs.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



1291
1292
1293
1294
# File 'lib/spatio-sdk/api/notes_api.rb', line 1291

def rotate_note_share_token(id, opts = {})
  data, _status_code, _headers = rotate_note_share_token_with_http_info(id, opts)
  data
end

#rotate_note_share_token_with_http_info(id, opts = {}) ⇒ Array<(ShareSettings, Integer, Hash)>

Rotate the share token, invalidating any outstanding URLs.

Parameters:

  • id (String)

    Note id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(ShareSettings, Integer, Hash)>)

    ShareSettings data, response status code and response headers



1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
# File 'lib/spatio-sdk/api/notes_api.rb', line 1302

def rotate_note_share_token_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.rotate_note_share_token ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.rotate_note_share_token"
  end
  # resource path
  local_var_path = '/v1/notes/{id}/share/rotate'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ShareSettings'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.rotate_note_share_token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#rotate_note_share_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_block(id, update_block_request, opts = {}) ⇒ Block

Update a block (partial).

Parameters:

  • id (String)

    Block id.

  • update_block_request (UpdateBlockRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



1359
1360
1361
1362
# File 'lib/spatio-sdk/api/notes_api.rb', line 1359

def update_block(id, update_block_request, opts = {})
  data, _status_code, _headers = update_block_with_http_info(id, update_block_request, opts)
  data
end

#update_block_with_http_info(id, update_block_request, opts = {}) ⇒ Array<(Block, Integer, Hash)>

Update a block (partial).

Parameters:

  • id (String)

    Block id.

  • update_block_request (UpdateBlockRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(Block, Integer, Hash)>)

    Block data, response status code and response headers



1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
# File 'lib/spatio-sdk/api/notes_api.rb', line 1371

def update_block_with_http_info(id, update_block_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.update_block ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.update_block"
  end
  # verify the required parameter 'update_block_request' is set
  if @api_client.config.client_side_validation && update_block_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_block_request' when calling NotesApi.update_block"
  end
  # resource path
  local_var_path = '/v1/notes/blocks/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_block_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Block'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.update_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#update_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_note(id, update_note_request, opts = {}) ⇒ Note

Update a note (partial).

Parameters:

  • id (String)

    Note id.

  • update_note_request (UpdateNoteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



1437
1438
1439
1440
# File 'lib/spatio-sdk/api/notes_api.rb', line 1437

def update_note(id, update_note_request, opts = {})
  data, _status_code, _headers = update_note_with_http_info(id, update_note_request, opts)
  data
end

#update_note_comment(id, comment_id, update_comment_request, opts = {}) ⇒ CommentMutationResponse

Edit a comment. Only the comment author can edit. The note owner can delete via ‘DELETE` but cannot rewrite.

Parameters:

  • id (String)

    Note id.

  • comment_id (String)

    Comment id.

  • update_comment_request (UpdateCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:



1517
1518
1519
1520
# File 'lib/spatio-sdk/api/notes_api.rb', line 1517

def update_note_comment(id, comment_id, update_comment_request, opts = {})
  data, _status_code, _headers = update_note_comment_with_http_info(id, comment_id, update_comment_request, opts)
  data
end

#update_note_comment_with_http_info(id, comment_id, update_comment_request, opts = {}) ⇒ Array<(CommentMutationResponse, Integer, Hash)>

Edit a comment. Only the comment author can edit. The note owner can delete via &#x60;DELETE&#x60; but cannot rewrite.

Parameters:

  • id (String)

    Note id.

  • comment_id (String)

    Comment id.

  • update_comment_request (UpdateCommentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(CommentMutationResponse, Integer, Hash)>)

    CommentMutationResponse data, response status code and response headers



1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
# File 'lib/spatio-sdk/api/notes_api.rb', line 1531

def update_note_comment_with_http_info(id, comment_id, update_comment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.update_note_comment ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.update_note_comment"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling NotesApi.update_note_comment"
  end
  # verify the required parameter 'update_comment_request' is set
  if @api_client.config.client_side_validation && update_comment_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_comment_request' when calling NotesApi.update_note_comment"
  end
  # resource path
  local_var_path = '/v1/notes/{id}/comments/{commentId}'.sub('{id}', CGI.escape(id.to_s)).sub('{commentId}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_comment_request)

  # return_type
  return_type = opts[:debug_return_type] || 'CommentMutationResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.update_note_comment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#update_note_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_note_with_http_info(id, update_note_request, opts = {}) ⇒ Array<(Note, Integer, Hash)>

Update a note (partial).

Parameters:

  • id (String)

    Note id.

  • update_note_request (UpdateNoteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.

  • :x_workspace_id (String)

    Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns:

  • (Array<(Note, Integer, Hash)>)

    Note data, response status code and response headers



1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
# File 'lib/spatio-sdk/api/notes_api.rb', line 1449

def update_note_with_http_info(id, update_note_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.update_note ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.update_note"
  end
  # verify the required parameter 'update_note_request' is set
  if @api_client.config.client_side_validation && update_note_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_note_request' when calling NotesApi.update_note"
  end
  # resource path
  local_var_path = '/v1/notes/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_note_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Note'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.update_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#update_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_create_note(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>

Parameters:

  • org (String)
  • workspace (String)
  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


1599
1600
1601
1602
# File 'lib/spatio-sdk/api/notes_api.rb', line 1599

def workspace_create_note(org, workspace, request_body, opts = {})
  data, _status_code, _headers = workspace_create_note_with_http_info(org, workspace, request_body, opts)
  data
end

#workspace_create_note_block(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


1676
1677
1678
1679
# File 'lib/spatio-sdk/api/notes_api.rb', line 1676

def workspace_create_note_block(org, workspace, id, request_body, opts = {})
  data, _status_code, _headers = workspace_create_note_block_with_http_info(org, workspace, id, request_body, opts)
  data
end

#workspace_create_note_block_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Returns Hash<String, Object> data, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
# File 'lib/spatio-sdk/api/notes_api.rb', line 1687

def workspace_create_note_block_with_http_info(org, workspace, id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_create_note_block ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_create_note_block"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_create_note_block"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.workspace_create_note_block"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling NotesApi.workspace_create_note_block"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes/{id}/blocks'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_create_note_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_create_note_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_create_note_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Returns Hash<String, Object> data, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
# File 'lib/spatio-sdk/api/notes_api.rb', line 1609

def workspace_create_note_with_http_info(org, workspace, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_create_note ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_create_note"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_create_note"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling NotesApi.workspace_create_note"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_create_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_create_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_delete_note(org, workspace, id, opts = {}) ⇒ nil

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1757
1758
1759
1760
# File 'lib/spatio-sdk/api/notes_api.rb', line 1757

def workspace_delete_note(org, workspace, id, opts = {})
  workspace_delete_note_with_http_info(org, workspace, id, opts)
  nil
end

#workspace_delete_note_block(org, workspace, id, opts = {}) ⇒ nil

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1828
1829
1830
1831
# File 'lib/spatio-sdk/api/notes_api.rb', line 1828

def workspace_delete_note_block(org, workspace, id, opts = {})
  workspace_delete_note_block_with_http_info(org, workspace, id, opts)
  nil
end

#workspace_delete_note_block_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Returns nil, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
# File 'lib/spatio-sdk/api/notes_api.rb', line 1838

def workspace_delete_note_block_with_http_info(org, workspace, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_delete_note_block ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_delete_note_block"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_delete_note_block"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.workspace_delete_note_block"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes/blocks/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_delete_note_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_delete_note_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_delete_note_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Returns nil, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
# File 'lib/spatio-sdk/api/notes_api.rb', line 1767

def workspace_delete_note_with_http_info(org, workspace, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_delete_note ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_delete_note"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_delete_note"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.workspace_delete_note"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_delete_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_delete_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_get_note(org, workspace, id, opts = {}) ⇒ Hash<String, Object>

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


1899
1900
1901
1902
# File 'lib/spatio-sdk/api/notes_api.rb', line 1899

def workspace_get_note(org, workspace, id, opts = {})
  data, _status_code, _headers = workspace_get_note_with_http_info(org, workspace, id, opts)
  data
end

#workspace_get_note_block(org, workspace, id, opts = {}) ⇒ Hash<String, Object>

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


1970
1971
1972
1973
# File 'lib/spatio-sdk/api/notes_api.rb', line 1970

def workspace_get_note_block(org, workspace, id, opts = {})
  data, _status_code, _headers = workspace_get_note_block_with_http_info(org, workspace, id, opts)
  data
end

#workspace_get_note_block_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Returns Hash<String, Object> data, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
# File 'lib/spatio-sdk/api/notes_api.rb', line 1980

def workspace_get_note_block_with_http_info(org, workspace, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_get_note_block ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_get_note_block"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_get_note_block"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.workspace_get_note_block"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes/blocks/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_get_note_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_get_note_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_get_note_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Returns Hash<String, Object> data, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
# File 'lib/spatio-sdk/api/notes_api.rb', line 1909

def workspace_get_note_with_http_info(org, workspace, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_get_note ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_get_note"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_get_note"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.workspace_get_note"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_get_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_get_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_list_note_blocks(org, workspace, id, opts = {}) ⇒ Hash<String, Object>

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


2041
2042
2043
2044
# File 'lib/spatio-sdk/api/notes_api.rb', line 2041

def workspace_list_note_blocks(org, workspace, id, opts = {})
  data, _status_code, _headers = workspace_list_note_blocks_with_http_info(org, workspace, id, opts)
  data
end

#workspace_list_note_blocks_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Returns Hash<String, Object> data, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
# File 'lib/spatio-sdk/api/notes_api.rb', line 2051

def workspace_list_note_blocks_with_http_info(org, workspace, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_list_note_blocks ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_list_note_blocks"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_list_note_blocks"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.workspace_list_note_blocks"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes/{id}/blocks'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_list_note_blocks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_list_note_blocks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_list_notes(org, workspace, opts = {}) ⇒ Hash<String, Object>

Parameters:

  • org (String)
  • workspace (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


2111
2112
2113
2114
# File 'lib/spatio-sdk/api/notes_api.rb', line 2111

def workspace_list_notes(org, workspace, opts = {})
  data, _status_code, _headers = workspace_list_notes_with_http_info(org, workspace, opts)
  data
end

#workspace_list_notes_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Returns Hash<String, Object> data, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
# File 'lib/spatio-sdk/api/notes_api.rb', line 2120

def workspace_list_notes_with_http_info(org, workspace, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_list_notes ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_list_notes"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_list_notes"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_list_notes",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_list_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_move_note_block(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


2178
2179
2180
2181
# File 'lib/spatio-sdk/api/notes_api.rb', line 2178

def workspace_move_note_block(org, workspace, id, request_body, opts = {})
  data, _status_code, _headers = workspace_move_note_block_with_http_info(org, workspace, id, request_body, opts)
  data
end

#workspace_move_note_block_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Returns Hash<String, Object> data, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
# File 'lib/spatio-sdk/api/notes_api.rb', line 2189

def workspace_move_note_block_with_http_info(org, workspace, id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_move_note_block ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_move_note_block"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_move_note_block"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.workspace_move_note_block"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling NotesApi.workspace_move_note_block"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes/blocks/{id}/move'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_move_note_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_move_note_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_update_note(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


2260
2261
2262
2263
# File 'lib/spatio-sdk/api/notes_api.rb', line 2260

def workspace_update_note(org, workspace, id, request_body, opts = {})
  data, _status_code, _headers = workspace_update_note_with_http_info(org, workspace, id, request_body, opts)
  data
end

#workspace_update_note_block(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


2342
2343
2344
2345
# File 'lib/spatio-sdk/api/notes_api.rb', line 2342

def workspace_update_note_block(org, workspace, id, request_body, opts = {})
  data, _status_code, _headers = workspace_update_note_block_with_http_info(org, workspace, id, request_body, opts)
  data
end

#workspace_update_note_block_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Returns Hash<String, Object> data, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
# File 'lib/spatio-sdk/api/notes_api.rb', line 2353

def workspace_update_note_block_with_http_info(org, workspace, id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_update_note_block ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_update_note_block"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_update_note_block"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.workspace_update_note_block"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling NotesApi.workspace_update_note_block"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes/blocks/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_update_note_block",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_update_note_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workspace_update_note_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Returns Hash<String, Object> data, response status code and response headers.

Parameters:

  • org (String)
  • workspace (String)
  • id (String)
  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
# File 'lib/spatio-sdk/api/notes_api.rb', line 2271

def workspace_update_note_with_http_info(org, workspace, id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: NotesApi.workspace_update_note ...'
  end
  # verify the required parameter 'org' is set
  if @api_client.config.client_side_validation && org.nil?
    fail ArgumentError, "Missing the required parameter 'org' when calling NotesApi.workspace_update_note"
  end
  # verify the required parameter 'workspace' is set
  if @api_client.config.client_side_validation && workspace.nil?
    fail ArgumentError, "Missing the required parameter 'workspace' when calling NotesApi.workspace_update_note"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling NotesApi.workspace_update_note"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling NotesApi.workspace_update_note"
  end
  # resource path
  local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/notes/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"NotesApi.workspace_update_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: NotesApi#workspace_update_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end