@wix/auto_sdk_benefit-programs_program-definitions 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -223,6 +223,167 @@ interface Cursors {
223
223
  */
224
224
  prev?: string | null;
225
225
  }
226
+ interface UpsertProgramDefinitionRequest {
227
+ /** Program definition to be created or updated. */
228
+ programDefinition?: ProgramDefinition;
229
+ }
230
+ interface UpsertProgramDefinitionResponse {
231
+ /** Created or updated program definition. */
232
+ programDefinition?: ProgramDefinition;
233
+ }
234
+ interface GetOrCreateProgramDefinitionRequest {
235
+ /**
236
+ * Application sub-module that represents the source of the program definition. Specified by the external developer. This namespace is used to handle and retrieve program definition and associated programs.
237
+ * @minLength 1
238
+ * @maxLength 20
239
+ */
240
+ namespace?: string;
241
+ /**
242
+ * External program definition ID.
243
+ * @format GUID
244
+ */
245
+ externalId?: string;
246
+ }
247
+ interface GetOrCreateProgramDefinitionResponse {
248
+ /** The created or updated program definition. */
249
+ programDefinition?: ProgramDefinition;
250
+ }
251
+ interface DomainEvent extends DomainEventBodyOneOf {
252
+ createdEvent?: EntityCreatedEvent;
253
+ updatedEvent?: EntityUpdatedEvent;
254
+ deletedEvent?: EntityDeletedEvent;
255
+ actionEvent?: ActionEvent;
256
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
257
+ id?: string;
258
+ /**
259
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
260
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
261
+ */
262
+ entityFqdn?: string;
263
+ /**
264
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
265
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
266
+ */
267
+ slug?: string;
268
+ /** ID of the entity associated with the event. */
269
+ entityId?: string;
270
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
271
+ eventTime?: Date | null;
272
+ /**
273
+ * Whether the event was triggered as a result of a privacy regulation application
274
+ * (for example, GDPR).
275
+ */
276
+ triggeredByAnonymizeRequest?: boolean | null;
277
+ /** If present, indicates the action that triggered the event. */
278
+ originatedFrom?: string | null;
279
+ /**
280
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
281
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
282
+ */
283
+ entityEventSequence?: string | null;
284
+ }
285
+ /** @oneof */
286
+ interface DomainEventBodyOneOf {
287
+ createdEvent?: EntityCreatedEvent;
288
+ updatedEvent?: EntityUpdatedEvent;
289
+ deletedEvent?: EntityDeletedEvent;
290
+ actionEvent?: ActionEvent;
291
+ }
292
+ interface EntityCreatedEvent {
293
+ entityAsJson?: string;
294
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
295
+ restoreInfo?: RestoreInfo;
296
+ }
297
+ interface RestoreInfo {
298
+ deletedDate?: Date | null;
299
+ }
300
+ interface EntityUpdatedEvent {
301
+ /**
302
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
303
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
304
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
305
+ */
306
+ currentEntityAsJson?: string;
307
+ }
308
+ interface EntityDeletedEvent {
309
+ /** Entity that was deleted. */
310
+ deletedEntityAsJson?: string | null;
311
+ }
312
+ interface ActionEvent {
313
+ bodyAsJson?: string;
314
+ }
315
+ interface MessageEnvelope {
316
+ /**
317
+ * App instance ID.
318
+ * @format GUID
319
+ */
320
+ instanceId?: string | null;
321
+ /**
322
+ * Event type.
323
+ * @maxLength 150
324
+ */
325
+ eventType?: string;
326
+ /** The identification type and identity data. */
327
+ identity?: IdentificationData;
328
+ /** Stringify payload. */
329
+ data?: string;
330
+ }
331
+ interface IdentificationData extends IdentificationDataIdOneOf {
332
+ /**
333
+ * ID of a site visitor that has not logged in to the site.
334
+ * @format GUID
335
+ */
336
+ anonymousVisitorId?: string;
337
+ /**
338
+ * ID of a site visitor that has logged in to the site.
339
+ * @format GUID
340
+ */
341
+ memberId?: string;
342
+ /**
343
+ * ID of a Wix user (site owner, contributor, etc.).
344
+ * @format GUID
345
+ */
346
+ wixUserId?: string;
347
+ /**
348
+ * ID of an app.
349
+ * @format GUID
350
+ */
351
+ appId?: string;
352
+ /** @readonly */
353
+ identityType?: WebhookIdentityTypeWithLiterals;
354
+ }
355
+ /** @oneof */
356
+ interface IdentificationDataIdOneOf {
357
+ /**
358
+ * ID of a site visitor that has not logged in to the site.
359
+ * @format GUID
360
+ */
361
+ anonymousVisitorId?: string;
362
+ /**
363
+ * ID of a site visitor that has logged in to the site.
364
+ * @format GUID
365
+ */
366
+ memberId?: string;
367
+ /**
368
+ * ID of a Wix user (site owner, contributor, etc.).
369
+ * @format GUID
370
+ */
371
+ wixUserId?: string;
372
+ /**
373
+ * ID of an app.
374
+ * @format GUID
375
+ */
376
+ appId?: string;
377
+ }
378
+ declare enum WebhookIdentityType {
379
+ UNKNOWN = "UNKNOWN",
380
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
381
+ MEMBER = "MEMBER",
382
+ WIX_USER = "WIX_USER",
383
+ APP = "APP"
384
+ }
385
+ /** @enumType */
386
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
226
387
 
227
388
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
228
389
  getUrl: (context: any) => string;
@@ -247,4 +408,4 @@ declare function getProgramDefinition(): __PublicMethodMetaInfo<'GET', {
247
408
  declare function getProgramDefinitionByExternalIdAndNamespace(): __PublicMethodMetaInfo<'GET', {}, GetProgramDefinitionByExternalIdAndNamespaceRequest$1, GetProgramDefinitionByExternalIdAndNamespaceRequest, GetProgramDefinitionByExternalIdAndNamespaceResponse$1, GetProgramDefinitionByExternalIdAndNamespaceResponse>;
248
409
  declare function queryProgramDefinitions(): __PublicMethodMetaInfo<'POST', {}, QueryProgramDefinitionsRequest$1, QueryProgramDefinitionsRequest, QueryProgramDefinitionsResponse$1, QueryProgramDefinitionsResponse>;
249
410
 
250
- export { type __PublicMethodMetaInfo, createProgramDefinition, deleteProgramDefinition, getProgramDefinition, getProgramDefinitionByExternalIdAndNamespace, queryProgramDefinitions, updateProgramDefinition };
411
+ export { type ActionEvent as ActionEventOriginal, Cascade as CascadeOriginal, type CascadeWithLiterals as CascadeWithLiteralsOriginal, type CreateProgramDefinitionRequest as CreateProgramDefinitionRequestOriginal, type CreateProgramDefinitionResponse as CreateProgramDefinitionResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteProgramDefinitionRequest as DeleteProgramDefinitionRequestOriginal, type DeleteProgramDefinitionResponse as DeleteProgramDefinitionResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetOrCreateProgramDefinitionRequest as GetOrCreateProgramDefinitionRequestOriginal, type GetOrCreateProgramDefinitionResponse as GetOrCreateProgramDefinitionResponseOriginal, type GetProgramDefinitionByExternalIdAndNamespaceRequest as GetProgramDefinitionByExternalIdAndNamespaceRequestOriginal, type GetProgramDefinitionByExternalIdAndNamespaceResponse as GetProgramDefinitionByExternalIdAndNamespaceResponseOriginal, type GetProgramDefinitionRequest as GetProgramDefinitionRequestOriginal, type GetProgramDefinitionResponse as GetProgramDefinitionResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type ProgramDefinition as ProgramDefinitionOriginal, type QueryProgramDefinitionsRequest as QueryProgramDefinitionsRequestOriginal, type QueryProgramDefinitionsResponse as QueryProgramDefinitionsResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type UpdateProgramDefinitionRequest as UpdateProgramDefinitionRequestOriginal, type UpdateProgramDefinitionResponse as UpdateProgramDefinitionResponseOriginal, type UpsertProgramDefinitionRequest as UpsertProgramDefinitionRequestOriginal, type UpsertProgramDefinitionResponse as UpsertProgramDefinitionResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createProgramDefinition, deleteProgramDefinition, getProgramDefinition, getProgramDefinitionByExternalIdAndNamespace, queryProgramDefinitions, updateProgramDefinition };
package/build/cjs/meta.js CHANGED
@@ -20,6 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // meta.ts
21
21
  var meta_exports = {};
22
22
  __export(meta_exports, {
23
+ CascadeOriginal: () => Cascade,
24
+ SortOrderOriginal: () => SortOrder,
25
+ WebhookIdentityTypeOriginal: () => WebhookIdentityType,
23
26
  createProgramDefinition: () => createProgramDefinition2,
24
27
  deleteProgramDefinition: () => deleteProgramDefinition2,
25
28
  getProgramDefinition: () => getProgramDefinition2,
@@ -334,6 +337,28 @@ function queryProgramDefinitions(payload) {
334
337
  return __queryProgramDefinitions;
335
338
  }
336
339
 
340
+ // src/benefit-programs-v1-program-definition-program-definitions.types.ts
341
+ var Cascade = /* @__PURE__ */ ((Cascade2) => {
342
+ Cascade2["UNKNOWN_CASCADE"] = "UNKNOWN_CASCADE";
343
+ Cascade2["NEXT_RENEWAL"] = "NEXT_RENEWAL";
344
+ Cascade2["IMMEDIATELY"] = "IMMEDIATELY";
345
+ Cascade2["FUTURE_PROVISIONS"] = "FUTURE_PROVISIONS";
346
+ return Cascade2;
347
+ })(Cascade || {});
348
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
349
+ SortOrder2["ASC"] = "ASC";
350
+ SortOrder2["DESC"] = "DESC";
351
+ return SortOrder2;
352
+ })(SortOrder || {});
353
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
354
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
355
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
356
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
357
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
358
+ WebhookIdentityType2["APP"] = "APP";
359
+ return WebhookIdentityType2;
360
+ })(WebhookIdentityType || {});
361
+
337
362
  // src/benefit-programs-v1-program-definition-program-definitions.meta.ts
338
363
  function createProgramDefinition2() {
339
364
  const payload = {};
@@ -457,6 +482,9 @@ function queryProgramDefinitions2() {
457
482
  }
458
483
  // Annotate the CommonJS export names for ESM import in node:
459
484
  0 && (module.exports = {
485
+ CascadeOriginal,
486
+ SortOrderOriginal,
487
+ WebhookIdentityTypeOriginal,
460
488
  createProgramDefinition,
461
489
  deleteProgramDefinition,
462
490
  getProgramDefinition,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/benefit-programs-v1-program-definition-program-definitions.http.ts","../../src/benefit-programs-v1-program-definition-program-definitions.meta.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-program-definition-program-definitions.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/program-definitions',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n {\n srcPath: '/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_program-definitions';\n\n/** Creates a program definition. */\nexport function createProgramDefinition(\n payload: object\n): RequestOptionsFactory<any> {\n function __createProgramDefinition({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.CreateProgramDefinition',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n { protoPath: '/v1/program-definitions', data: serializedData, host }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createProgramDefinition;\n}\n\n/**\n * Updates a program definition.\n *\n * Each time the program definition is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the program definition.\n * This ensures you're working with the latest program definition\n * and prevents unintended overwrites.\n */\nexport function updateProgramDefinition(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateProgramDefinition({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.UpdateProgramDefinition',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n {\n protoPath: '/v1/program-definitions/{programDefinition.id}',\n data: serializedData,\n host,\n }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateProgramDefinition;\n}\n\n/** Deletes a program definition. */\nexport function deleteProgramDefinition(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteProgramDefinition({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.DeleteProgramDefinition',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n {\n protoPath: '/v1/program-definitions/{programDefinitionId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteProgramDefinition;\n}\n\n/** Retrieves a program definition. */\nexport function getProgramDefinition(\n payload: object\n): RequestOptionsFactory<any> {\n function __getProgramDefinition({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'GET' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.GetProgramDefinition',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n {\n protoPath: '/v1/program-definitions/{programDefinitionId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getProgramDefinition;\n}\n\n/** Retrieves a program definition with the specified external ID and namespace. */\nexport function getProgramDefinitionByExternalIdAndNamespace(\n payload: object\n): RequestOptionsFactory<any> {\n function __getProgramDefinitionByExternalIdAndNamespace({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'GET' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.GetProgramDefinitionByExternalIdAndNamespace',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n {\n protoPath: '/v1/program-definitions/by-namespace-and-external-id',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getProgramDefinitionByExternalIdAndNamespace;\n}\n\n/**\n * Creates a query to retrieve a list of program definitions.\n *\n * The Query Program Definitions method builds a query to retrieve a list of program definitions and returns a `ProgramDefinitionsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ProgramDefinitionsQueryBuilder` methods onto the query. `ProgramDefinitionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Program Definitions returns.\n *\n * Query Program Definitions has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ProgramDefinitionsQueryResult`.\n */\nexport function queryProgramDefinitions(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryProgramDefinitions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.QueryProgramDefinitions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n { protoPath: '/v1/program-definitions/query', data: payload, host }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'programDefinitions.createdDate' },\n { path: 'programDefinitions.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryProgramDefinitions;\n}\n","import * as ambassadorWixBenefitProgramsV1ProgramDefinition from './benefit-programs-v1-program-definition-program-definitions.http.js';\nimport * as ambassadorWixBenefitProgramsV1ProgramDefinitionTypes from './benefit-programs-v1-program-definition-program-definitions.types.js';\nimport * as ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes from './benefit-programs-v1-program-definition-program-definitions.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createProgramDefinition(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.CreateProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.CreateProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.CreateProgramDefinitionResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.CreateProgramDefinitionResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.createProgramDefinition(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program-definitions',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateProgramDefinition(): __PublicMethodMetaInfo<\n 'PATCH',\n { programDefinitionId: string },\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.UpdateProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.UpdateProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.UpdateProgramDefinitionResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.UpdateProgramDefinitionResponse\n> {\n const payload = { programDefinition: { id: ':programDefinitionId' } } as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.updateProgramDefinition(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/program-definitions/{programDefinition.id}',\n pathParams: { programDefinitionId: 'programDefinitionId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteProgramDefinition(): __PublicMethodMetaInfo<\n 'DELETE',\n { programDefinitionId: string },\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.DeleteProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.DeleteProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.DeleteProgramDefinitionResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.DeleteProgramDefinitionResponse\n> {\n const payload = { programDefinitionId: ':programDefinitionId' } as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.deleteProgramDefinition(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/program-definitions/{programDefinitionId}',\n pathParams: { programDefinitionId: 'programDefinitionId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getProgramDefinition(): __PublicMethodMetaInfo<\n 'GET',\n { programDefinitionId: string },\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.GetProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.GetProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.GetProgramDefinitionResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.GetProgramDefinitionResponse\n> {\n const payload = { programDefinitionId: ':programDefinitionId' } as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.getProgramDefinition(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/program-definitions/{programDefinitionId}',\n pathParams: { programDefinitionId: 'programDefinitionId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getProgramDefinitionByExternalIdAndNamespace(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.GetProgramDefinitionByExternalIdAndNamespaceRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.GetProgramDefinitionByExternalIdAndNamespaceRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.GetProgramDefinitionByExternalIdAndNamespaceResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.GetProgramDefinitionByExternalIdAndNamespaceResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.getProgramDefinitionByExternalIdAndNamespace(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/program-definitions/by-namespace-and-external-id',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryProgramDefinitions(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.QueryProgramDefinitionsRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.QueryProgramDefinitionsRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.QueryProgramDefinitionsResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.QueryProgramDefinitionsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.queryProgramDefinitions(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program-definitions/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iCAAAA;AAAA,EAAA,+BAAAC;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AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createProgramDefinition","deleteProgramDefinition","getProgramDefinition","getProgramDefinitionByExternalIdAndNamespace","queryProgramDefinitions","updateProgramDefinition","import_timestamp","import_rest_modules","payload","createProgramDefinition","updateProgramDefinition","deleteProgramDefinition","getProgramDefinition","getProgramDefinitionByExternalIdAndNamespace","queryProgramDefinitions"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/benefit-programs-v1-program-definition-program-definitions.http.ts","../../src/benefit-programs-v1-program-definition-program-definitions.types.ts","../../src/benefit-programs-v1-program-definition-program-definitions.meta.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-program-definition-program-definitions.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/program-definitions',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-program-definitions',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n {\n srcPath: '/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/program-definitions',\n destPath: '/v1/program-definitions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_program-definitions';\n\n/** Creates a program definition. */\nexport function createProgramDefinition(\n payload: object\n): RequestOptionsFactory<any> {\n function __createProgramDefinition({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.CreateProgramDefinition',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n { protoPath: '/v1/program-definitions', data: serializedData, host }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createProgramDefinition;\n}\n\n/**\n * Updates a program definition.\n *\n * Each time the program definition is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the program definition.\n * This ensures you're working with the latest program definition\n * and prevents unintended overwrites.\n */\nexport function updateProgramDefinition(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateProgramDefinition({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.UpdateProgramDefinition',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n {\n protoPath: '/v1/program-definitions/{programDefinition.id}',\n data: serializedData,\n host,\n }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateProgramDefinition;\n}\n\n/** Deletes a program definition. */\nexport function deleteProgramDefinition(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteProgramDefinition({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.DeleteProgramDefinition',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n {\n protoPath: '/v1/program-definitions/{programDefinitionId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteProgramDefinition;\n}\n\n/** Retrieves a program definition. */\nexport function getProgramDefinition(\n payload: object\n): RequestOptionsFactory<any> {\n function __getProgramDefinition({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'GET' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.GetProgramDefinition',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n {\n protoPath: '/v1/program-definitions/{programDefinitionId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getProgramDefinition;\n}\n\n/** Retrieves a program definition with the specified external ID and namespace. */\nexport function getProgramDefinitionByExternalIdAndNamespace(\n payload: object\n): RequestOptionsFactory<any> {\n function __getProgramDefinitionByExternalIdAndNamespace({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'GET' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.GetProgramDefinitionByExternalIdAndNamespace',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n {\n protoPath: '/v1/program-definitions/by-namespace-and-external-id',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'programDefinition.createdDate' },\n { path: 'programDefinition.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getProgramDefinitionByExternalIdAndNamespace;\n}\n\n/**\n * Creates a query to retrieve a list of program definitions.\n *\n * The Query Program Definitions method builds a query to retrieve a list of program definitions and returns a `ProgramDefinitionsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ProgramDefinitionsQueryBuilder` methods onto the query. `ProgramDefinitionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Program Definitions returns.\n *\n * Query Program Definitions has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ProgramDefinitionsQueryResult`.\n */\nexport function queryProgramDefinitions(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryProgramDefinitions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.program_definition',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.program_definition.ProgramDefinitionService.QueryProgramDefinitions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ProgramDefinitionProgramDefinitionServiceUrl(\n { protoPath: '/v1/program-definitions/query', data: payload, host }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'programDefinitions.createdDate' },\n { path: 'programDefinitions.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryProgramDefinitions;\n}\n","export interface ProgramDefinition {\n /**\n * Program definition ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n id?: string | null;\n /**\n * Revision number, which increments by 1 each time the program definition is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the program definition.\n *\n * Ignored when creating a program definition.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the program definition was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the program definition was updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Program definition name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @immutable\n * @readonly\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string | null;\n /**\n * Custom field data for the program definition object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * ID for the program definition defined by you. You can use `externalId` to filter queries.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface CreateProgramDefinitionRequest {\n /** Program definition to create. */\n programDefinition: ProgramDefinition;\n}\n\nexport interface CreateProgramDefinitionResponse {\n /** Created program definition. */\n programDefinition?: ProgramDefinition;\n}\n\nexport interface UpdateProgramDefinitionRequest {\n /** Program definition to update. */\n programDefinition: ProgramDefinition;\n}\n\nexport interface UpdateProgramDefinitionResponse {\n /** Updated program definition. */\n programDefinition?: ProgramDefinition;\n}\n\nexport interface DeleteProgramDefinitionRequest {\n /**\n * ID of the program definition to delete.\n * @format GUID\n */\n programDefinitionId: string;\n /** Determines when the changes to this program definition will be applied to associated programs and pools. */\n cascadeType?: CascadeWithLiterals;\n}\n\nexport enum Cascade {\n /** Unknown cascade. */\n UNKNOWN_CASCADE = 'UNKNOWN_CASCADE',\n /** Changes are applied to existing programs and pools when they are next renewed. */\n NEXT_RENEWAL = 'NEXT_RENEWAL',\n /** Changes are applied to associated programs and pools immediately. */\n IMMEDIATELY = 'IMMEDIATELY',\n /** Changes are not applied to existing associated programs and pools. They are only applied to future programs and pools. */\n FUTURE_PROVISIONS = 'FUTURE_PROVISIONS',\n}\n\n/** @enumType */\nexport type CascadeWithLiterals =\n | Cascade\n | 'UNKNOWN_CASCADE'\n | 'NEXT_RENEWAL'\n | 'IMMEDIATELY'\n | 'FUTURE_PROVISIONS';\n\nexport interface DeleteProgramDefinitionResponse {}\n\nexport interface GetProgramDefinitionRequest {\n /**\n * ID of the program definition to retrieve.\n * @format GUID\n */\n programDefinitionId: string;\n}\n\nexport interface GetProgramDefinitionResponse {\n /** Retrieved program definition. */\n programDefinition?: ProgramDefinition;\n}\n\nexport interface GetProgramDefinitionByExternalIdAndNamespaceRequest {\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n /**\n * Program definition external ID.\n * @format GUID\n */\n externalId: string;\n}\n\nexport interface GetProgramDefinitionByExternalIdAndNamespaceResponse {\n /** Retrieved program definition. */\n programDefinition?: ProgramDefinition;\n}\n\nexport interface QueryProgramDefinitionsRequest {\n /** Filter, sort, and paging to apply to the query. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * for more information.\n */\n filter?: Record<string, any> | null;\n /**\n * List of sort objects.\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /**\n * Sort order. Use `ASC` for ascending order or `DESC` for descending order.\n *\n * Default: `ASC`\n */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n /** Ascending sort order. */\n ASC = 'ASC',\n /** Descending sort order. */\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryProgramDefinitionsResponse {\n /** List of retrieved program definitions. */\n programDefinitions?: ProgramDefinition[];\n /** Metadata for the paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface UpsertProgramDefinitionRequest {\n /** Program definition to be created or updated. */\n programDefinition?: ProgramDefinition;\n}\n\nexport interface UpsertProgramDefinitionResponse {\n /** Created or updated program definition. */\n programDefinition?: ProgramDefinition;\n}\n\nexport interface GetOrCreateProgramDefinitionRequest {\n /**\n * Application sub-module that represents the source of the program definition. Specified by the external developer. This namespace is used to handle and retrieve program definition and associated programs.\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string;\n /**\n * External program definition ID.\n * @format GUID\n */\n externalId?: string;\n}\n\nexport interface GetOrCreateProgramDefinitionResponse {\n /** The created or updated program definition. */\n programDefinition?: ProgramDefinition;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n","import * as ambassadorWixBenefitProgramsV1ProgramDefinition from './benefit-programs-v1-program-definition-program-definitions.http.js';\nimport * as ambassadorWixBenefitProgramsV1ProgramDefinitionTypes from './benefit-programs-v1-program-definition-program-definitions.types.js';\nimport * as ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes from './benefit-programs-v1-program-definition-program-definitions.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createProgramDefinition(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.CreateProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.CreateProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.CreateProgramDefinitionResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.CreateProgramDefinitionResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.createProgramDefinition(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program-definitions',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateProgramDefinition(): __PublicMethodMetaInfo<\n 'PATCH',\n { programDefinitionId: string },\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.UpdateProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.UpdateProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.UpdateProgramDefinitionResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.UpdateProgramDefinitionResponse\n> {\n const payload = { programDefinition: { id: ':programDefinitionId' } } as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.updateProgramDefinition(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/program-definitions/{programDefinition.id}',\n pathParams: { programDefinitionId: 'programDefinitionId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteProgramDefinition(): __PublicMethodMetaInfo<\n 'DELETE',\n { programDefinitionId: string },\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.DeleteProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.DeleteProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.DeleteProgramDefinitionResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.DeleteProgramDefinitionResponse\n> {\n const payload = { programDefinitionId: ':programDefinitionId' } as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.deleteProgramDefinition(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/program-definitions/{programDefinitionId}',\n pathParams: { programDefinitionId: 'programDefinitionId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getProgramDefinition(): __PublicMethodMetaInfo<\n 'GET',\n { programDefinitionId: string },\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.GetProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.GetProgramDefinitionRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.GetProgramDefinitionResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.GetProgramDefinitionResponse\n> {\n const payload = { programDefinitionId: ':programDefinitionId' } as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.getProgramDefinition(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/program-definitions/{programDefinitionId}',\n pathParams: { programDefinitionId: 'programDefinitionId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getProgramDefinitionByExternalIdAndNamespace(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.GetProgramDefinitionByExternalIdAndNamespaceRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.GetProgramDefinitionByExternalIdAndNamespaceRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.GetProgramDefinitionByExternalIdAndNamespaceResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.GetProgramDefinitionByExternalIdAndNamespaceResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.getProgramDefinitionByExternalIdAndNamespace(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/program-definitions/by-namespace-and-external-id',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryProgramDefinitions(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.QueryProgramDefinitionsRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.QueryProgramDefinitionsRequest,\n ambassadorWixBenefitProgramsV1ProgramDefinitionUniversalTypes.QueryProgramDefinitionsResponse,\n ambassadorWixBenefitProgramsV1ProgramDefinitionTypes.QueryProgramDefinitionsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1ProgramDefinition.queryProgramDefinitions(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program-definitions/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n ProgramDefinition as ProgramDefinitionOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n CreateProgramDefinitionRequest as CreateProgramDefinitionRequestOriginal,\n CreateProgramDefinitionResponse as CreateProgramDefinitionResponseOriginal,\n UpdateProgramDefinitionRequest as UpdateProgramDefinitionRequestOriginal,\n UpdateProgramDefinitionResponse as UpdateProgramDefinitionResponseOriginal,\n DeleteProgramDefinitionRequest as DeleteProgramDefinitionRequestOriginal,\n Cascade as CascadeOriginal,\n CascadeWithLiterals as CascadeWithLiteralsOriginal,\n DeleteProgramDefinitionResponse as DeleteProgramDefinitionResponseOriginal,\n GetProgramDefinitionRequest as GetProgramDefinitionRequestOriginal,\n GetProgramDefinitionResponse as GetProgramDefinitionResponseOriginal,\n GetProgramDefinitionByExternalIdAndNamespaceRequest as GetProgramDefinitionByExternalIdAndNamespaceRequestOriginal,\n GetProgramDefinitionByExternalIdAndNamespaceResponse as GetProgramDefinitionByExternalIdAndNamespaceResponseOriginal,\n QueryProgramDefinitionsRequest as QueryProgramDefinitionsRequestOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryProgramDefinitionsResponse as QueryProgramDefinitionsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n UpsertProgramDefinitionRequest as UpsertProgramDefinitionRequestOriginal,\n UpsertProgramDefinitionResponse as UpsertProgramDefinitionResponseOriginal,\n GetOrCreateProgramDefinitionRequest as GetOrCreateProgramDefinitionRequestOriginal,\n GetOrCreateProgramDefinitionResponse as GetOrCreateProgramDefinitionResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './benefit-programs-v1-program-definition-program-definitions.types.js';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EAAE,qBAAqB,sBAAsB;AAAA,IACzD,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,gDAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC4C;AAAA,IAC9C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,2BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC4C;AAAA,IAC9C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createProgramDefinition","deleteProgramDefinition","getProgramDefinition","getProgramDefinitionByExternalIdAndNamespace","queryProgramDefinitions","updateProgramDefinition","import_timestamp","import_rest_modules","payload","Cascade","SortOrder","WebhookIdentityType","createProgramDefinition","updateProgramDefinition","deleteProgramDefinition","getProgramDefinition","getProgramDefinitionByExternalIdAndNamespace","queryProgramDefinitions"]}
@@ -223,6 +223,167 @@ interface Cursors {
223
223
  */
224
224
  prev?: string | null;
225
225
  }
226
+ interface UpsertProgramDefinitionRequest {
227
+ /** Program definition to be created or updated. */
228
+ programDefinition?: ProgramDefinition;
229
+ }
230
+ interface UpsertProgramDefinitionResponse {
231
+ /** Created or updated program definition. */
232
+ programDefinition?: ProgramDefinition;
233
+ }
234
+ interface GetOrCreateProgramDefinitionRequest {
235
+ /**
236
+ * Application sub-module that represents the source of the program definition. Specified by the external developer. This namespace is used to handle and retrieve program definition and associated programs.
237
+ * @minLength 1
238
+ * @maxLength 20
239
+ */
240
+ namespace?: string;
241
+ /**
242
+ * External program definition ID.
243
+ * @format GUID
244
+ */
245
+ externalId?: string;
246
+ }
247
+ interface GetOrCreateProgramDefinitionResponse {
248
+ /** The created or updated program definition. */
249
+ programDefinition?: ProgramDefinition;
250
+ }
251
+ interface DomainEvent extends DomainEventBodyOneOf {
252
+ createdEvent?: EntityCreatedEvent;
253
+ updatedEvent?: EntityUpdatedEvent;
254
+ deletedEvent?: EntityDeletedEvent;
255
+ actionEvent?: ActionEvent;
256
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
257
+ id?: string;
258
+ /**
259
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
260
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
261
+ */
262
+ entityFqdn?: string;
263
+ /**
264
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
265
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
266
+ */
267
+ slug?: string;
268
+ /** ID of the entity associated with the event. */
269
+ entityId?: string;
270
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
271
+ eventTime?: Date | null;
272
+ /**
273
+ * Whether the event was triggered as a result of a privacy regulation application
274
+ * (for example, GDPR).
275
+ */
276
+ triggeredByAnonymizeRequest?: boolean | null;
277
+ /** If present, indicates the action that triggered the event. */
278
+ originatedFrom?: string | null;
279
+ /**
280
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
281
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
282
+ */
283
+ entityEventSequence?: string | null;
284
+ }
285
+ /** @oneof */
286
+ interface DomainEventBodyOneOf {
287
+ createdEvent?: EntityCreatedEvent;
288
+ updatedEvent?: EntityUpdatedEvent;
289
+ deletedEvent?: EntityDeletedEvent;
290
+ actionEvent?: ActionEvent;
291
+ }
292
+ interface EntityCreatedEvent {
293
+ entityAsJson?: string;
294
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
295
+ restoreInfo?: RestoreInfo;
296
+ }
297
+ interface RestoreInfo {
298
+ deletedDate?: Date | null;
299
+ }
300
+ interface EntityUpdatedEvent {
301
+ /**
302
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
303
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
304
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
305
+ */
306
+ currentEntityAsJson?: string;
307
+ }
308
+ interface EntityDeletedEvent {
309
+ /** Entity that was deleted. */
310
+ deletedEntityAsJson?: string | null;
311
+ }
312
+ interface ActionEvent {
313
+ bodyAsJson?: string;
314
+ }
315
+ interface MessageEnvelope {
316
+ /**
317
+ * App instance ID.
318
+ * @format GUID
319
+ */
320
+ instanceId?: string | null;
321
+ /**
322
+ * Event type.
323
+ * @maxLength 150
324
+ */
325
+ eventType?: string;
326
+ /** The identification type and identity data. */
327
+ identity?: IdentificationData;
328
+ /** Stringify payload. */
329
+ data?: string;
330
+ }
331
+ interface IdentificationData extends IdentificationDataIdOneOf {
332
+ /**
333
+ * ID of a site visitor that has not logged in to the site.
334
+ * @format GUID
335
+ */
336
+ anonymousVisitorId?: string;
337
+ /**
338
+ * ID of a site visitor that has logged in to the site.
339
+ * @format GUID
340
+ */
341
+ memberId?: string;
342
+ /**
343
+ * ID of a Wix user (site owner, contributor, etc.).
344
+ * @format GUID
345
+ */
346
+ wixUserId?: string;
347
+ /**
348
+ * ID of an app.
349
+ * @format GUID
350
+ */
351
+ appId?: string;
352
+ /** @readonly */
353
+ identityType?: WebhookIdentityTypeWithLiterals;
354
+ }
355
+ /** @oneof */
356
+ interface IdentificationDataIdOneOf {
357
+ /**
358
+ * ID of a site visitor that has not logged in to the site.
359
+ * @format GUID
360
+ */
361
+ anonymousVisitorId?: string;
362
+ /**
363
+ * ID of a site visitor that has logged in to the site.
364
+ * @format GUID
365
+ */
366
+ memberId?: string;
367
+ /**
368
+ * ID of a Wix user (site owner, contributor, etc.).
369
+ * @format GUID
370
+ */
371
+ wixUserId?: string;
372
+ /**
373
+ * ID of an app.
374
+ * @format GUID
375
+ */
376
+ appId?: string;
377
+ }
378
+ declare enum WebhookIdentityType {
379
+ UNKNOWN = "UNKNOWN",
380
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
381
+ MEMBER = "MEMBER",
382
+ WIX_USER = "WIX_USER",
383
+ APP = "APP"
384
+ }
385
+ /** @enumType */
386
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
226
387
 
227
388
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
228
389
  getUrl: (context: any) => string;
@@ -247,4 +408,4 @@ declare function getProgramDefinition(): __PublicMethodMetaInfo<'GET', {
247
408
  declare function getProgramDefinitionByExternalIdAndNamespace(): __PublicMethodMetaInfo<'GET', {}, GetProgramDefinitionByExternalIdAndNamespaceRequest$1, GetProgramDefinitionByExternalIdAndNamespaceRequest, GetProgramDefinitionByExternalIdAndNamespaceResponse$1, GetProgramDefinitionByExternalIdAndNamespaceResponse>;
248
409
  declare function queryProgramDefinitions(): __PublicMethodMetaInfo<'POST', {}, QueryProgramDefinitionsRequest$1, QueryProgramDefinitionsRequest, QueryProgramDefinitionsResponse$1, QueryProgramDefinitionsResponse>;
249
410
 
250
- export { type __PublicMethodMetaInfo, createProgramDefinition, deleteProgramDefinition, getProgramDefinition, getProgramDefinitionByExternalIdAndNamespace, queryProgramDefinitions, updateProgramDefinition };
411
+ export { type ActionEvent as ActionEventOriginal, Cascade as CascadeOriginal, type CascadeWithLiterals as CascadeWithLiteralsOriginal, type CreateProgramDefinitionRequest as CreateProgramDefinitionRequestOriginal, type CreateProgramDefinitionResponse as CreateProgramDefinitionResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteProgramDefinitionRequest as DeleteProgramDefinitionRequestOriginal, type DeleteProgramDefinitionResponse as DeleteProgramDefinitionResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetOrCreateProgramDefinitionRequest as GetOrCreateProgramDefinitionRequestOriginal, type GetOrCreateProgramDefinitionResponse as GetOrCreateProgramDefinitionResponseOriginal, type GetProgramDefinitionByExternalIdAndNamespaceRequest as GetProgramDefinitionByExternalIdAndNamespaceRequestOriginal, type GetProgramDefinitionByExternalIdAndNamespaceResponse as GetProgramDefinitionByExternalIdAndNamespaceResponseOriginal, type GetProgramDefinitionRequest as GetProgramDefinitionRequestOriginal, type GetProgramDefinitionResponse as GetProgramDefinitionResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type ProgramDefinition as ProgramDefinitionOriginal, type QueryProgramDefinitionsRequest as QueryProgramDefinitionsRequestOriginal, type QueryProgramDefinitionsResponse as QueryProgramDefinitionsResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type UpdateProgramDefinitionRequest as UpdateProgramDefinitionRequestOriginal, type UpdateProgramDefinitionResponse as UpdateProgramDefinitionResponseOriginal, type UpsertProgramDefinitionRequest as UpsertProgramDefinitionRequestOriginal, type UpsertProgramDefinitionResponse as UpsertProgramDefinitionResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createProgramDefinition, deleteProgramDefinition, getProgramDefinition, getProgramDefinitionByExternalIdAndNamespace, queryProgramDefinitions, updateProgramDefinition };
package/build/es/meta.mjs CHANGED
@@ -303,6 +303,28 @@ function queryProgramDefinitions(payload) {
303
303
  return __queryProgramDefinitions;
304
304
  }
305
305
 
306
+ // src/benefit-programs-v1-program-definition-program-definitions.types.ts
307
+ var Cascade = /* @__PURE__ */ ((Cascade2) => {
308
+ Cascade2["UNKNOWN_CASCADE"] = "UNKNOWN_CASCADE";
309
+ Cascade2["NEXT_RENEWAL"] = "NEXT_RENEWAL";
310
+ Cascade2["IMMEDIATELY"] = "IMMEDIATELY";
311
+ Cascade2["FUTURE_PROVISIONS"] = "FUTURE_PROVISIONS";
312
+ return Cascade2;
313
+ })(Cascade || {});
314
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
315
+ SortOrder2["ASC"] = "ASC";
316
+ SortOrder2["DESC"] = "DESC";
317
+ return SortOrder2;
318
+ })(SortOrder || {});
319
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
320
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
321
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
322
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
323
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
324
+ WebhookIdentityType2["APP"] = "APP";
325
+ return WebhookIdentityType2;
326
+ })(WebhookIdentityType || {});
327
+
306
328
  // src/benefit-programs-v1-program-definition-program-definitions.meta.ts
307
329
  function createProgramDefinition2() {
308
330
  const payload = {};
@@ -425,6 +447,9 @@ function queryProgramDefinitions2() {
425
447
  };
426
448
  }
427
449
  export {
450
+ Cascade as CascadeOriginal,
451
+ SortOrder as SortOrderOriginal,
452
+ WebhookIdentityType as WebhookIdentityTypeOriginal,
428
453
  createProgramDefinition2 as createProgramDefinition,
429
454
  deleteProgramDefinition2 as deleteProgramDefinition,
430
455
  getProgramDefinition2 as getProgramDefinition,